import Http from "../utils/Http";

export default class CartModel extends Http {

  list(data) {
    return this.request({
      url: '/h5/cart/list',
      data
    })
  }

  listTotal(data) {
    return this.request({
      url: '/h5/cart/list-total',
      data
    })
  }

  remove(data) {
    return this.request({
      url: '/h5/cart/delete-cart',
      data
    })
  }

  clear(data) {
    return this.request({
      url: '/h5/cart/clear-cart',
      data
    })
  }

  itemSelected(data) {
    return this.request({
      url: '/h5/cart/item-selected',
      data
    })
  }

  allSelected(data) {
    return this.request({
      url: '/h5/cart/all-selected',
      data
    })
  }

  decrement(data) {
    return this.request({
      url: '/h5/cart/decrement',
      data
    })
  }

  increment(data) {
    return this.request({
      url: '/h5/cart/increment',
      data
    })
  }

  changeQuantity(data) {
    return this.request({
      url: '/h5/cart/change-quantity',
      data
    })
  }

  // 检测复购
  checkRepeat(data) {
    return this.request({
      url: '/h5/cart/check-repeat',
      data
    })
  }

}
